package com.niit.agricstore.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.niit.agricstore.entity.User;

import java.util.List;

public interface UserService extends IService<User> {
    List<User> findAllUsers();
    User loginCheck(String username,String password);

    String userRegister(User user);

    int updatePassword(Long id, String newpass);
    PageInfo<User> findUserAllByPage(Integer pageNum, Integer pageSize);

    PageInfo<User> findUserNameByPage(int pageNum, int pageSize, String name);

    PageInfo<User> findUserIdByPage(int pageNum, int pageSize, Long id);

    int deleteUser(Long id);
    int updateLoginTime(Long id,String phone);
    int updatePhone(Long id, String phone);

    PageInfo<User> findUserPhoneByPage(int pageNum, int pageSize, String phone);

    User getCurrentUser(Long id);
}
